import React, { Component } from 'react'
import { HashRouter, NavLink, Switch, Route, Redirect } from 'react-router-dom'
import Home from '../../views/second-router/home'
import Cate from '../../views/second-router/cate'
import Catr from '../../views/second-router/catr'
import Mine from '../../views/second-router/mine'
import '../../assets/css/index.css'
export default class index extends Component {
    render() {
        return (
            <div>
               
                <HashRouter>
                    <div className='nav'>
                        <NavLink to='/index/home' activeClassName='color bg1'>商城</NavLink>
                        <NavLink to='/index/cate' activeClassName='color bg2'>分类</NavLink>
                        <NavLink to='/index/catr' activeClassName='color bg3'>购物车</NavLink>
                        <NavLink to='/index/mine' activeClassName='color bg4'>我的</NavLink>
                    </div>

                    <Switch>

                        <Route path='/index/home' component={Home} >
                          
                        </Route>

                        <Route path='/index/catr' component={Catr} ></Route>
                        <Route path='/index/cate' component={Cate} ></Route>
                        <Route path='/index/mine' component={Mine} ></Route>
                    </Switch>
                </HashRouter>
               
            </div>
        )
    }
}
